 <template>
  <div id="index">
    <el-card class="box-card"> 详情{{ articleList.content }} </el-card>
  </div>
</template>
<script type="text/javascript">
export default {
  data() {
    return {
      articleId: "",
      category: [],
      articleList: {
        title: "",
        content: "",
      },
    };
  },

  created() {
    // this.getData();
    this.getDetail();
  },
  methods: {
    getData() {
      this.$axios.get("/api/blog/detail?id=1").then((res) => {
        this.articleList = res.data.data;
        // console.log(this.articleList);
        // console.log(res);
        //console.log(res.data.data)
        //this.category= res.data.data.categoryList
        // console.log( this.category)
      });
    },
    getDetail() {
      this.articleId = this.$route.query.id;
      this.$axios.get("/api/blog/detail?id=" + this.articleId).then((res) => {
        this.articleList = res.data.data;
        // console.log(this.articleList);
        // console.log(res);
        //console.log(res.data.data)
        //this.category= res.data.data.categoryList
        // console.log( this.category)
      });
    },
  },
};
</script>
<style>
.text {
  font-size: 14px;
}

.item {
  padding: 18px 0;
}

.box-card {
  width: 480px;
}
</style>